package com.my.zone.service;

import java.util.ArrayList;
import java.util.List;

import com.my.zone.dao.ZoneDao;
import com.my.zone.dao.ZoneDaoImpl;
import com.my.zone.entity.Zone;

public class ZoneServiceImpl implements ZoneService {
	ZoneDao zd=new ZoneDaoImpl();
	@Override
	public boolean addOne(Zone zone) {
		boolean flag=zd.addOne(zone);
		return flag;
	}

	@Override
	public boolean deleteOneById(int id) {
		boolean flag=zd.deleteOneById(id);
		return flag;
	}

	@Override
	public List<Zone> selectZone() {
		List<Zone> zoneList=new ArrayList<Zone>();
		zoneList=zd.selectZone();
		return zoneList;
	}

	@Override
	public boolean updateOne(Zone zone) {
		boolean flag=zd.updateOne(zone); 
		return flag;
	}

}
